package com.cx.service.impl;

import com.cx.mapper.ActivityMapper;
import com.cx.pojo.Activity;
import com.cx.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ActivityServiceImpl implements ActivityService {
    @Autowired  // 自动装配mapper
    ActivityMapper activityMapper;

    @Override
    public int insert(Activity activity) {
        return activityMapper.insert(activity);
    }

    @Override
    public int deleteByPrimaryKey(Integer actId) {
        return activityMapper.deleteByPrimaryKey(actId);
    }

    @Override
    public int updateByPrimaryKey(Activity activity) {
        return activityMapper.updateByPrimaryKey(activity);
    }

    @Override
    public Activity selectByPrimaryKey(Integer actId) {
        return activityMapper.selectByPrimaryKey(actId);
    }
}
